const { Schema, model } = require('mongoose');

const tenantsSchema = new Schema({
    //定义好名称后数据库定义名称要一样
    phone: String,
    name: String,
    IDCard: String,
    state: {
        type: Number,
        default: 1,//1 表示未认证
    },
    credits: {
        type: Number,
        default: 90,  //信用值  
    }
}, { versionKey: false })

const tenantsModel = model('tenantsModel', tenantsSchema, 'tenants')



module.exports.tenantsModel = tenantsModel

